package com.mxpio.erp.common.workshop.entity;

import javax.persistence.*;

import com.mxpio.erp.common.technology.entity.ProcessInfo;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;


@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_WORKSHOP_MO_ROUTE")
@Schema(description="订单工艺路线行-工序")
public class ManufactureOrderRoute extends BaseEntity {

	private static final long serialVersionUID = 1L;


	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	private String id;

	@Column(name = "BIZ_NO_", updatable = false)
	@Schema(description = "业务单号")
	private String bizNo;


	@Column(name = "ROUT_ID_" )
	@Schema(description  = "产品工艺路线ID")
	private String routId;

	@Column(name = "ROUT_PROC_ID_" )
	@Schema(description  = "产品工艺路线工序明细行ID")
	private String routProcId;

	@Column(name = "PROCESS_ORDER_" )
	@Schema(description  = "工艺序号")
	private Integer processOrder;



	/*@Column(name = "BEGIN_TIME_")
	@Schema(description = "生效日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date beginTime;

	@Column(name = "END_TIME_")
	@Schema(description = "失效日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date endTime;*/
	@Column(name = "PROC_GROUP_CODE_")
	@Schema(description  = "工序段编码")
	private String procGroupCode;

	@Column(name = "PROC_GROUP_NAME_" )
	@Schema(description  = "工序段名称")
	private String procGroupName;


	@Column(name = "PREPARATION_TIME_" )
	@Schema(description  = "标准准备工时（S）")
	private Integer preparationTime;

	@Column(name = "SINGLE_PIECE_TIME_" )
	@Schema(description  = "单件标准工时（S）")
	private Integer singlePieceTime;

	@Column(name = "PROCESS_CODE_")
	@Schema(description  = "工序编码")
	private String processCode;

	@Transient
	private ProcessInfo processInfo;

	@Column(name = "MODIFY_DOC_FILE_",length = 1000)
	@Schema(description = "变更工艺文件路径")
	private String modifyDocFile;

	@Column(name = "SCHEME_CODE_")
	@Schema(description = "检测方案编号")
	private String schemeCode;

	@Column(name = "SCHEME_NAME_")
	@Schema(description = "检测方案名称")
	private String schemeName;

	@Transient
	private List<ManufactureOrderRouteFixture> fixtureList;//工装夹具
}
